package com.java.design.pattern.decorator;

import java.math.BigDecimal;

/**
 * 芒果蛋糕的装饰器类
 * @author xin.ding
 * @date 2020/10/29 18:17
 */
public class CakeAddMangoDecorator extends CakeDecorator {
    public CakeAddMangoDecorator(Cake cake) {
        super(cake);
    }

    @Override
    public String getCakeMsg() {
        return super.getCakeMsg()+"+一个芒果";
    }

    @Override
    public BigDecimal getPrice() {
        return super.getPrice().add(BigDecimal.TEN);
    }
}
